package com.zhu.gmallpublisher.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController  //@ResponseBody  返回json
@RequestMapping("/zhu")
public class TestController {

    @RequestMapping("/shenzhen")
    public String test(){
        System.out.println("aaaa");
        return "success";
    }


    @RequestMapping("/test2")
    public String test2(@RequestParam(value = "nn",defaultValue = "zhu") String n,@RequestParam("aa") String age){
        System.out.println(n + age);  //将传入赋值给形参
        return "success";
    }
}
